﻿<Window x:Class="Softelligent.Zintra.Demos.Events.PublishShell.Views.MainView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Telephone Call Publisher"
        Height="400"
        Width="600">

    <Window.DataContext>
        <Binding Path="Main"
                 Source="{StaticResource Locator}" />
    </Window.DataContext>

    <Grid>
        <TabControl Name="tabControl1">
            <TabItem Header="Telephone Call"
                     Name="tabItem1">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="100" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Label Content="From"
                           Height="28"
                           HorizontalAlignment="Left"
                           Margin="6,6,0,0"
                           Name="label1"
                           VerticalAlignment="Top" />
                    <Label Content="To"
                           Height="28"
                           HorizontalAlignment="Left"
                           Margin="6,40,0,0"
                           Name="label2"
                           VerticalAlignment="Top" />
                    <TextBox Grid.Column="1"
                             Height="23"
                             Margin="12,12,12,0"
                             Name="fromText"
                             VerticalAlignment="Top"
                             Text="{Binding Path=FromNumber, UpdateSourceTrigger=PropertyChanged}" />
                    <TextBox Height="23"
                             Margin="12,40,12,0"
                             Name="toText"
                             VerticalAlignment="Top"
                             Grid.Column="1"
                             Text="{Binding Path=ToNumber, UpdateSourceTrigger=PropertyChanged}" />
                    <Button Content="Publish"
                            Grid.Column="1"
                            Height="23"
                            HorizontalAlignment="Left"
                            Margin="12,69,0,0"
                            Name="publishButton"
                            VerticalAlignment="Top"
                            Width="75"
                            IsDefault="True"
                            Command="{Binding PublishCommand}" />
                    <TextBlock Foreground="Red"
                               Height="28"
                               Margin="12,98,12,0"
                               Name="publishErrorText"
                               VerticalAlignment="Top"
                               Grid.Column="1"
                               Text="{Binding Path=PublishError}" />
                    <ScrollViewer Grid.Column="1"
                                  Margin="0,126,0,0"
                                  Grid.RowSpan="2">
                        <Label Padding="6"
                               Name="logText"
                               ScrollViewer.VerticalScrollBarVisibility="Visible"
                               Content="{Binding Path=Log}"/>
                    </ScrollViewer>
                </Grid>
            </TabItem>
            <TabItem Header="Activation"
                     Name="tabItem2">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="100" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <TextBox Height="23"
                             Margin="6,8,6,0"
                             Name="activationKeyText"
                             VerticalAlignment="Top"
                             Grid.Column="1"
                             Text="{Binding Path=ActivationKey}" />
                    <Button Content="Activate"
                            Height="23"
                            HorizontalAlignment="Left"
                            Margin="6,37,0,0"
                            Name="activationButton"
                            VerticalAlignment="Top"
                            Width="75"
                            Command="{Binding ActivateCommand}"
                            Grid.Column="1" />
                    <Label Content="Activation key"
                           Height="28"
                           HorizontalAlignment="Left"
                           Margin="6,6,0,0"
                           Name="label3"
                           VerticalAlignment="Top" />
                    <TextBlock Grid.Column="1"
                               Height="28"
                               Margin="6,66,6,0"
                               Name="activationErrorText"
                               Foreground="Red"
                               VerticalAlignment="Top"
                               Text="{Binding Path=ActivationError}" />
                </Grid>
            </TabItem>
        </TabControl>
    </Grid>
</Window>
